/***********************************************************************
	filename: 	FalAnimationImageProperties.cpp
	created:	2009.03.27
	author:		Yum

	purpose:	Interface for properties for the FalagardAnimationImage class.
	*************************************************************************/
/***************************************************************************
*   Copyright (C) 2008 - 2009 Yqzs
***************************************************************************/
#include "FalAnimationImage.h"
#include "CEGUIPropertyHelper.h"

// Start of CEGUI namespace section
namespace CEGUI
{

// Start of FalagardAnimationImageProperties namespace section
namespace FalagardAnimationImageProperties
{
	String  Image::get(const PropertyReceiver* receiver) const
	{
		FalagardAnimationImage* wr = static_cast<FalagardAnimationImage*>(
			static_cast<const Window*>(receiver)->getWindowRenderer());
		return PropertyHelper::imageToString(wr->getImage());
	}

	void    Image::set(PropertyReceiver* receiver, const String& value)
	{
		FalagardAnimationImage* wr = static_cast<FalagardAnimationImage*>(
			static_cast<Window*>(receiver)->getWindowRenderer());
		wr->setImage(PropertyHelper::stringToImage(value));
	}

	String  ImageList::get(const PropertyReceiver* receiver) const
	{
		FalagardAnimationImage* wr = static_cast<FalagardAnimationImage*>(
			static_cast<const Window*>(receiver)->getWindowRenderer());
		return PropertyHelper::imageListToString(wr->getImageList());
	}

	void    ImageList::set(PropertyReceiver* receiver, const String& value)
	{
		FalagardAnimationImage* wr = static_cast<FalagardAnimationImage*>(
			static_cast<Window*>(receiver)->getWindowRenderer());
		wr->setImageList(&PropertyHelper::stringToImageList(value));
	}

	String  Mask::get(const PropertyReceiver* receiver) const
	{
		FalagardAnimationImage* wr = static_cast<FalagardAnimationImage*>(
			static_cast<const Window*>(receiver)->getWindowRenderer());
		return PropertyHelper::maskToString(wr->getMask());
	}

	void    Mask::set(PropertyReceiver* receiver, const String& value)
	{
		FalagardAnimationImage* wr = static_cast<FalagardAnimationImage*>(
			static_cast<Window*>(receiver)->getWindowRenderer());
		wr->setMask(PropertyHelper::stringToMask(value));
	}

} // End of  FalagardAnimationImageProperties namespace section

} // End of  CEGUI namespace section
